-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VPC: VPCCluster definition extension #1683
Conversation
Hi @cjschaef. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: cjschaef The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
✅ Deploy Preview for kubernetes-sigs-cluster-api-ibmcloud ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
dfd4d79
to
7fe0b99
Compare
ControlPlaneLoadBalancer *VPCLoadBalancerSpec `json:"controlPlaneLoadBalancer,omitempty"` | ||
|
||
// cosInstance is the IBM COS instance to use for cluster resources. | ||
COSInstance *COSInstance `json:"cosInstance,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the shared basic types is added in time, this should be COSInstanceReference
, from types.go
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm dropping this reference, as I don't plan to manage COS resources.
Instead, I will incorporate a new ImageSpec
, which will have details about the expected VSI Custom Image, which could include a COS ObjectURL, to create a new Custom Image from, if necessary.
// SecurityGroup dummy. | ||
// TODO(cjschaef): Dummy SecurityGroup until it is defined in a common location. | ||
type SecurityGroup struct { | ||
Name string `json:"name"` | ||
} | ||
|
||
// COSInstance dummy. | ||
// TODO(cjschaef): Dummy COSInstance until it is defined in a common location. | ||
type COSInstance struct { | ||
Name string `json:"name"` | ||
} | ||
|
||
// VPCResource dummy. | ||
// TODO(cjschaef): Dummy VPCResource until it is defined in a common location. | ||
type VPCResource struct { | ||
Name string `json:"name"` | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/ok-to-test |
/hold |
/cc @Karthik-K-N |
api/v1beta2/ibmvpccluster_types.go
Outdated
// VPCResourceStatus identifies a resource by crn and type and whether it was created by the controller. | ||
type VPCResourceStatus struct { | ||
// controllerCreated indicates whether the resource is created by the CAPI controller. | ||
ControllerCreated bool `json:"controllerCreated,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since most of VPC resources can be tagged, better to make use of tags instead of ControllerCreated. tags will be very easy comapared to managing state of this variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may need to think on this one more. I could move to rely on tags, but I know in the past we could not, or simply did not, in terms of performing resource management, perhaps a limitation with VPC resources at the time, or the technology/component used to create such resources.
Perhaps CAPI relies on tags information, if possible, and outside layers and logic transform that information as necessary. I may not know more on how to handle this until I start getting deeper into interdependencies, expectancies, etc.
Do you have a suggestion for this, or simply added a Tags []string ...
? I didn't see a PowerVS equivalent, and I think the Status
results will be necessary for post-Infrastructure-provisioning processing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or are you expecting that CAPI (or other components/automation) would look for specific Tags on resources (say a VSI with CAPI-created
tag or something like that)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dropped the bool for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies some how I missed it. Yes what I am thinking is once the capi creates the resource in cloud say VPC, lets tag that resource with tag like CAPI-created or something, so it would help us in deciding on deleting that resource.
In PowerVS we cannot make use of tags as few services doesnot support tagging like DHCP, Network so on
api/v1beta2/ibmvpccluster_types.go
Outdated
|
||
// type defines the type of IBM Cloud resource. | ||
// +required | ||
Type ResourceType `json:"type"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think its usage will be like
VPC *VPCResourceStatus `json:"vpc,omitempty"
```
so do you think we need to again set VPC.Type =vpc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I think that would be the simple case, I am concerned about more complex cases.
I will drop the type for now then, and attempt to add it back in if/when I need to when I start making changes to reconcile
logic changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dropped the Type for now.
Extend the VPCCluster definition to include additional VPC resources and expand configuration options.
7fe0b99
to
33d3af9
Compare
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
some of the changes are already merged part of other PRs recently, lets close this and push remaining ones in a different one. |
Extend the VPCCluster definition to include additional VPC resources and expand configuration options.
What this PR does / why we need it: Expands the supported resource creation/management for VPC clusters
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes # N/A
Special notes for your reviewer:
/area provider/ibmcloud
Release note: